package com.example.myapp;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;

import androidx.appcompat.app.AppCompatActivity;

public class SettingActivity extends AppCompatActivity {

    private Button set_Btn;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_setting);

        set_Btn=findViewById(R.id.set_btn);

        set_Btn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Toast.makeText(SettingActivity.this, "返回成功", Toast.LENGTH_SHORT).show();
                Intent intent=new Intent();
                intent.setClass(SettingActivity.this,MainActivity.class);
                startActivity(intent);
            }
        });
     }
}
